/*
 * -------------------------------------------------------------------------------------------------------*
 * SBS Priceboard V2.0
 * Copyright (C) 2008 Unicom Vietnam JSC
 * -------------------------------------------------------------------------------------------------------* 
 * HeadURL: http://192.168.1.4/svn/priceboard/trunk/SBS_PriceboardV2/front-end/end-user/enduser_priceboard/
 * LastChangeBy:
 * LastChangeDate:
 */
package com.unicom.priceboard.data.vo;

import com.unicom.priceboard.util.Util;

/**
 * Creation date: Sep 5, 2008
 * @author quan
 */
public class Ptd {
	private String tradingDate;
	private String symbolStock;
	private String price;
	private String vol;
	private String buy_sell;
	
	public Ptd(PutAdElement putAd) {
		this.tradingDate = Util.getCurrentDate("yyyy-MM-dd");
		this.symbolStock = putAd.getSymbol_code();
		this.price = putAd.getPrice().replaceAll(",", "");
		this.vol = putAd.getVolume().replaceAll(",", "");;
		this.buy_sell = String.valueOf(putAd.getSide());
	}
	
	public Ptd(PutExecElement execElement) {
		this.tradingDate = Util.getCurrentDate("yyyy-MM-dd");
		this.symbolStock = execElement.symbol_code;
		this.price = execElement.getPrice().replaceAll(",", "");
		this.vol = execElement.getVolume().replaceAll(",", "");
		this.buy_sell = "A";
		
	}
	
	/**
	 * @return the tradingDate
	 */
	public String getTradingDate() {
		return tradingDate;
	}
	/**
	 * @return the symbolStock
	 */
	public String getSymbolStock() {
		return symbolStock;
	}
	/**
	 * @return the price
	 */
	public String getPrice() {
		return price;
	}
	/**
	 * @return the vol
	 */
	public String getVol() {
		return vol;
	}
	/**
	 * @return the buy_sell
	 */
	public String getBuy_sell() {
		return buy_sell;
	}
	
	/**
	 * @param tradingDate the tradingDate to set
	 */
	public void setTradingDate(String tradingDate) {
		this.tradingDate = tradingDate;
	}
	/**
	 * @param symbolStock the symbolStock to set
	 */
	public void setSymbolStock(String symbolStock) {
		this.symbolStock = symbolStock;
	}
	/**
	 * @param price the price to set
	 */
	public void setPrice(String price) {
		this.price = price;
	}
	/**
	 * @param vol the vol to set
	 */
	public void setVol(String vol) {
		this.vol = vol;
	}
	/**
	 * @param buy_sell the buy_sell to set
	 */
	public void setBuy_sell(String buy_sell) {
		this.buy_sell = buy_sell;
	}
}
